<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: H:/project/LibTools/src/socket/UdpIoClient.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_9ad1227260954e346101f3844f0abb3d.html">socket</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">UdpIoClient.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_udp_io_client_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __UDPIOCLIENTEX_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __UDPIOCLIENTEX_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_udp_client_8h.html">./internal/UdpClient.h</a>&quot;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160; </div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<a class="code" href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">class </span><a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>;</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160; </div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html">   12</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_c_udp_io_client.html">CUdpIoClient</a></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;{</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <a class="code" href="class_c_udp_io_client.html#aafa046f3bc9f1442d2187bcdac47dcf0">delete_class_copy_operator</a>(<a class="code" href="class_c_udp_io_client.html">CUdpIoClient</a>);</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a2537f3d1a10b449d2e1ea971ca364462">   20</a></span>&#160;    <a class="code" href="class_c_udp_io_client.html#a2537f3d1a10b449d2e1ea971ca364462">CUdpIoClient</a>(<span class="keywordtype">bool</span> isWriteLog = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>.<a class="code" href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">Reset</a>(<span class="keyword">new</span> <a class="code" href="class_c_udp_client.html">CUdpClient</a>(isWriteLog));</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    }</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#aefc6274bda975715b71eefbb0b7ad003">   25</a></span>&#160;    <a class="code" href="class_c_udp_io_client.html#aefc6274bda975715b71eefbb0b7ad003">~CUdpIoClient</a>() {}</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#ad0a173136d4e71786efd3fb1e7f97b84">   35</a></span>&#160;    <a class="code" href="class_c_sock_error.html">CSockError</a> <a class="code" href="class_c_udp_io_client.html#ad0a173136d4e71786efd3fb1e7f97b84">Init</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keywordtype">bool</span> isServer = <span class="keyword">false</span>) {</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#aebf05411c8a2938f71b20faa002fbe2a">Init</a>(*((<a class="code" href="class_c_socket.html">CSocket</a>*)&amp;sock), isServer);</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    }</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a4919fd340e3ae52db95b3cb118a3fa6f">   48</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#a4919fd340e3ae52db95b3cb118a3fa6f">AsyncConnect</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, Func func) {</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#ac80cab21b298c0b99e810fd19e06a42b">AsyncConnect</a>(*((<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)&amp;sock), <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    }</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#accf83768e36041acd016f70e55fabbc7">   52</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#accf83768e36041acd016f70e55fabbc7">AsyncConnect</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#ac80cab21b298c0b99e810fd19e06a42b">AsyncConnect</a>(*((<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)&amp;sock), <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ConnectHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#ad20305e6432d6fd5bf0be06e26015570">   66</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#ad20305e6432d6fd5bf0be06e26015570">AsyncRead</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func) {</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#a09c194e8776369953eb427572972df48">AsyncRead</a>(*((<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    }</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a89f366a9362dcb1bdf06e8c21ec064f9">   70</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#a89f366a9362dcb1bdf06e8c21ec064f9">AsyncRead</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#a09c194e8776369953eb427572972df48">AsyncRead</a>(*((<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> ReadHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    }</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#ac6b2c4ea6302ac57499d52ab6caa6188">   84</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#ac6b2c4ea6302ac57499d52ab6caa6188">AsyncSend</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func) {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#acbfb5c3d02d26c74940eb9c77a29fe48">AsyncSend</a>(*((<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandleNull&lt;Func&gt;(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#af3554d62f3995d7fbb1cdb132bf23349">   88</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#af3554d62f3995d7fbb1cdb132bf23349">AsyncSend</a>(<a class="code" href="class_c_udp_io_socket.html">CUdpIoSocket</a>&amp; sock, <span class="keyword">const</span> <a class="code" href="class_c_stream_iteator.html">CStreamIteator</a>&amp; buff, Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#acbfb5c3d02d26c74940eb9c77a29fe48">AsyncSend</a>(*((<a class="code" href="class_c_udp_socket.html">CUdpSocket</a>*)&amp;sock), buff, <a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> WriteHandle&lt;Func&gt;(func)), invoker);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    }</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#ab3c7e71d81a80ca50cc1f65feb61bcec">  101</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#ab3c7e71d81a80ca50cc1f65feb61bcec">Post</a>(Func func) {</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#a8cb56c4554afb0fd36e69c60a1e04933">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle_null.html">PostHandleNull&lt;Func&gt;</a>(func)), <a class="code" href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a>);</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> Func&gt;</div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a01dc1799ddc029dd2ea8b7c9be7110fd">  105</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#a01dc1799ddc029dd2ea8b7c9be7110fd">Post</a>(Func func, <span class="keywordtype">void</span>* invoker) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#a8cb56c4554afb0fd36e69c60a1e04933">Post</a>(<a class="code" href="class_shared_ptr.html">SharedPtr&lt;HandleBase&gt;</a>(<span class="keyword">new</span> <a class="code" href="class_post_handle.html">PostHandle&lt;Func&gt;</a>(func)), invoker);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_udp_io_client.html#a2da07449e58917750582771456ea5db6">Run</a>() {</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#a9d65087deb9bfea428ff3bb615ce9954">Run</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a46b4e76c70ef32897fa54504f61350df">  116</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_udp_io_client.html#a46b4e76c70ef32897fa54504f61350df">Run_One</a>() {</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#a23979cafab8a95298ec8c248e62c426c">Run_One</a>();</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    }</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a3ff270a2d81fd97119b8a6e3362cd066">  121</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#a3ff270a2d81fd97119b8a6e3362cd066">NotifyStop</a>() {</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#aa018e3d31a656f08527d151120c27794">NotifyStop</a>();</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;    }</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160; </div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#ab5c74cf31c8e1d27aec5449d8942e747">  126</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_c_udp_io_client.html#ab5c74cf31c8e1d27aec5449d8942e747">IsStop</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#ae07f629e082ecacf27ff0c91fa808ea5">IsStop</a>();</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    }</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a5ca3ce1b78a58ba18a64dba29bca3c8c">  131</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_c_udp_io_client.html#a5ca3ce1b78a58ba18a64dba29bca3c8c">WaitServerStop</a>() {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>-&gt;<a class="code" href="class_c_udp_client.html#aa9ed7c2a6ef85dcbba25056ff6777363">WaitServerStop</a>();</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    }</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160; </div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#ad895a6e4cacb163bdc64916e96cedb85">  136</a></span>&#160;    <a class="code" href="class_c_basic_service.html">CBasicService</a>* <a class="code" href="class_c_udp_io_client.html#ad895a6e4cacb163bdc64916e96cedb85">GetUdpServicePtr</a>() {</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <span class="keywordflow">return</span> dynamic_cast&lt;CBasicService*&gt;(<a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>.<a class="code" href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">Get</a>());</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    }</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160; </div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">  141</a></span>&#160;    <a class="code" href="class_shared_ptr.html">SharedPtr&lt;CUdpClient&gt;</a> <a class="code" href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">_service</a>;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;};</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;<a class="code" href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="preprocessor">#endif // __UDPIOCLIENTEX_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclass_c_udp_io_client_html_a1e315d3dd521f59444f6a44efa51657e"><div class="ttname"><a href="class_c_udp_io_client.html#a1e315d3dd521f59444f6a44efa51657e">CUdpIoClient::_service</a></div><div class="ttdeci">SharedPtr&lt; CUdpClient &gt; _service</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00141">UdpIoClient.h:141</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a4919fd340e3ae52db95b3cb118a3fa6f"><div class="ttname"><a href="class_c_udp_io_client.html#a4919fd340e3ae52db95b3cb118a3fa6f">CUdpIoClient::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(CUdpIoSocket &amp;sock, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00048">UdpIoClient.h:48</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a46b4e76c70ef32897fa54504f61350df"><div class="ttname"><a href="class_c_udp_io_client.html#a46b4e76c70ef32897fa54504f61350df">CUdpIoClient::Run_One</a></div><div class="ttdeci">bool Run_One()</div><div class="ttdoc">运行服务一次</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00116">UdpIoClient.h:116</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_ae07f629e082ecacf27ff0c91fa808ea5"><div class="ttname"><a href="class_c_udp_client.html#ae07f629e082ecacf27ff0c91fa808ea5">CUdpClient::IsStop</a></div><div class="ttdeci">virtual bool IsStop() const</div><div class="ttdoc">服务是否停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00123">UdpClient.cpp:123</a></div></div>
<div class="ttc" id="aclass_c_sock_error_html"><div class="ttname"><a href="class_c_sock_error.html">CSockError</a></div><div class="ttdoc">套接字错误信息类</div><div class="ttdef"><b>Definition:</b> <a href="_sock_error_8h_source.html#l00013">SockError.h:13</a></div></div>
<div class="ttc" id="aclass_c_stream_iteator_html"><div class="ttname"><a href="class_c_stream_iteator.html">CStreamIteator</a></div><div class="ttdef"><b>Definition:</b> <a href="_stream_byte_8h_source.html#l00011">StreamByte.h:11</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a2da07449e58917750582771456ea5db6"><div class="ttname"><a href="class_c_udp_io_client.html#a2da07449e58917750582771456ea5db6">CUdpIoClient::Run</a></div><div class="ttdeci">bool Run()</div><div class="ttdoc">运行服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00111">UdpIoClient.h:111</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_ac80cab21b298c0b99e810fd19e06a42b"><div class="ttname"><a href="class_c_udp_client.html#ac80cab21b298c0b99e810fd19e06a42b">CUdpClient::AsyncConnect</a></div><div class="ttdeci">virtual void AsyncConnect(CUdpSocket &amp;sock, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个连接请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00060">UdpClient.cpp:60</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html"><div class="ttname"><a href="class_shared_ptr.html">SharedPtr&lt; HandleBase &gt;</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0f15d2d3d2834b0667791f3abfd9e0d7"><div class="ttname"><a href="class_shared_ptr.html#a0f15d2d3d2834b0667791f3abfd9e0d7">SharedPtr::Get</a></div><div class="ttdeci">Ty * Get()</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00202">SharedPtr.h:202</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_a23979cafab8a95298ec8c248e62c426c"><div class="ttname"><a href="class_c_udp_client.html#a23979cafab8a95298ec8c248e62c426c">CUdpClient::Run_One</a></div><div class="ttdeci">virtual bool Run_One()</div><div class="ttdoc">运行一次服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00109">UdpClient.cpp:109</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a2537f3d1a10b449d2e1ea971ca364462"><div class="ttname"><a href="class_c_udp_io_client.html#a2537f3d1a10b449d2e1ea971ca364462">CUdpIoClient::CUdpIoClient</a></div><div class="ttdeci">CUdpIoClient(bool isWriteLog=false)</div><div class="ttdoc">构造udp io对象</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00020">UdpIoClient.h:20</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_acbfb5c3d02d26c74940eb9c77a29fe48"><div class="ttname"><a href="class_c_udp_client.html#acbfb5c3d02d26c74940eb9c77a29fe48">CUdpClient::AsyncSend</a></div><div class="ttdeci">virtual void AsyncSend(CUdpSocket &amp;sock, const CStreamIteator &amp;buff, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个写请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00080">UdpClient.cpp:80</a></div></div>
<div class="ttc" id="atools_8h_html_a201ce692c9dca6599e5c12d00167419b"><div class="ttname"><a href="tools_8h.html#a201ce692c9dca6599e5c12d00167419b">DEF_BEG_LIBTOOLS</a></div><div class="ttdeci">#define DEF_BEG_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00036">tools.h:36</a></div></div>
<div class="ttc" id="aclass_c_udp_socket_html"><div class="ttname"><a href="class_c_udp_socket.html">CUdpSocket</a></div><div class="ttdoc">udp套接口</div><div class="ttdef"><b>Definition:</b> <a href="_udp_socket_8h_source.html#l00010">UdpSocket.h:10</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_aefc6274bda975715b71eefbb0b7ad003"><div class="ttname"><a href="class_c_udp_io_client.html#aefc6274bda975715b71eefbb0b7ad003">CUdpIoClient::~CUdpIoClient</a></div><div class="ttdeci">~CUdpIoClient()</div><div class="ttdoc">销毁udp io对象</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00025">UdpIoClient.h:25</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a89f366a9362dcb1bdf06e8c21ec064f9"><div class="ttname"><a href="class_c_udp_io_client.html#a89f366a9362dcb1bdf06e8c21ec064f9">CUdpIoClient::AsyncRead</a></div><div class="ttdeci">void AsyncRead(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00070">UdpIoClient.h:70</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_a09c194e8776369953eb427572972df48"><div class="ttname"><a href="class_c_udp_client.html#a09c194e8776369953eb427572972df48">CUdpClient::AsyncRead</a></div><div class="ttdeci">virtual void AsyncRead(CUdpSocket &amp;sock, const CStreamIteator &amp;buff, const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个接收请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00070">UdpClient.cpp:70</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a01dc1799ddc029dd2ea8b7c9be7110fd"><div class="ttname"><a href="class_c_udp_io_client.html#a01dc1799ddc029dd2ea8b7c9be7110fd">CUdpIoClient::Post</a></div><div class="ttdeci">void Post(Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00105">UdpIoClient.h:105</a></div></div>
<div class="ttc" id="aclass_c_socket_html"><div class="ttname"><a href="class_c_socket.html">CSocket</a></div><div class="ttdoc">套接口类</div><div class="ttdef"><b>Definition:</b> <a href="_socket_8h_source.html#l00030">Socket.h:30</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_ad20305e6432d6fd5bf0be06e26015570"><div class="ttname"><a href="class_c_udp_io_client.html#ad20305e6432d6fd5bf0be06e26015570">CUdpIoClient::AsyncRead</a></div><div class="ttdeci">void AsyncRead(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00066">UdpIoClient.h:66</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_ad0a173136d4e71786efd3fb1e7f97b84"><div class="ttname"><a href="class_c_udp_io_client.html#ad0a173136d4e71786efd3fb1e7f97b84">CUdpIoClient::Init</a></div><div class="ttdeci">CSockError Init(CUdpIoSocket &amp;sock, bool isServer=false)</div><div class="ttdoc">初始化套接字与服务类设备进行绑定</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00035">UdpIoClient.h:35</a></div></div>
<div class="ttc" id="aclass_c_udp_io_socket_html"><div class="ttname"><a href="class_c_udp_io_socket.html">CUdpIoSocket</a></div><div class="ttdoc">用于udp进行io投递的套接字类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_socket_8h_source.html#l00018">UdpIoSocket.h:18</a></div></div>
<div class="ttc" id="atools_8h_html_ac909db71799bb22cb7d636a34cd785e4"><div class="ttname"><a href="tools_8h.html#ac909db71799bb22cb7d636a34cd785e4">DEF_END_LIBTOOLS</a></div><div class="ttdeci">#define DEF_END_LIBTOOLS</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00038">tools.h:38</a></div></div>
<div class="ttc" id="aclass_post_handle_html"><div class="ttname"><a href="class_post_handle.html">PostHandle</a></div><div class="ttdoc">用户投递回调</div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00242">SockTools.h:242</a></div></div>
<div class="ttc" id="a_udp_client_8h_html"><div class="ttname"><a href="_udp_client_8h.html">UdpClient.h</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_af3554d62f3995d7fbb1cdb132bf23349"><div class="ttname"><a href="class_c_udp_io_client.html#af3554d62f3995d7fbb1cdb132bf23349">CUdpIoClient::AsyncSend</a></div><div class="ttdeci">void AsyncSend(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00088">UdpIoClient.h:88</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a5ca3ce1b78a58ba18a64dba29bca3c8c"><div class="ttname"><a href="class_c_udp_io_client.html#a5ca3ce1b78a58ba18a64dba29bca3c8c">CUdpIoClient::WaitServerStop</a></div><div class="ttdeci">void WaitServerStop()</div><div class="ttdoc">通知服务停止并等待</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00131">UdpIoClient.h:131</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_ac6b2c4ea6302ac57499d52ab6caa6188"><div class="ttname"><a href="class_c_udp_io_client.html#ac6b2c4ea6302ac57499d52ab6caa6188">CUdpIoClient::AsyncSend</a></div><div class="ttdeci">void AsyncSend(CUdpIoSocket &amp;sock, const CStreamIteator &amp;buff, Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00084">UdpIoClient.h:84</a></div></div>
<div class="ttc" id="aclass_shared_ptr_html_a0b0a4c8396bf40f91994f729855c0a5a"><div class="ttname"><a href="class_shared_ptr.html#a0b0a4c8396bf40f91994f729855c0a5a">SharedPtr::Reset</a></div><div class="ttdeci">void Reset(Ty *p)</div><div class="ttdef"><b>Definition:</b> <a href="_shared_ptr_8h_source.html#l00175">SharedPtr.h:175</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_aa9ed7c2a6ef85dcbba25056ff6777363"><div class="ttname"><a href="class_c_udp_client.html#aa9ed7c2a6ef85dcbba25056ff6777363">CUdpClient::WaitServerStop</a></div><div class="ttdeci">virtual void WaitServerStop()</div><div class="ttdoc">通知服务停止并等待</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00129">UdpClient.cpp:129</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_ab5c74cf31c8e1d27aec5449d8942e747"><div class="ttname"><a href="class_c_udp_io_client.html#ab5c74cf31c8e1d27aec5449d8942e747">CUdpIoClient::IsStop</a></div><div class="ttdeci">bool IsStop() const</div><div class="ttdoc">判断服务是否已经停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00126">UdpIoClient.h:126</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_a9d65087deb9bfea428ff3bb615ce9954"><div class="ttname"><a href="class_c_udp_client.html#a9d65087deb9bfea428ff3bb615ce9954">CUdpClient::Run</a></div><div class="ttdeci">virtual bool Run()</div><div class="ttdoc">运行服务</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00100">UdpClient.cpp:100</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_a3ff270a2d81fd97119b8a6e3362cd066"><div class="ttname"><a href="class_c_udp_io_client.html#a3ff270a2d81fd97119b8a6e3362cd066">CUdpIoClient::NotifyStop</a></div><div class="ttdeci">void NotifyStop()</div><div class="ttdoc">通知服务停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00121">UdpIoClient.h:121</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_ab3c7e71d81a80ca50cc1f65feb61bcec"><div class="ttname"><a href="class_c_udp_io_client.html#ab3c7e71d81a80ca50cc1f65feb61bcec">CUdpIoClient::Post</a></div><div class="ttdeci">void Post(Func func)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00101">UdpIoClient.h:101</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_aebf05411c8a2938f71b20faa002fbe2a"><div class="ttname"><a href="class_c_udp_client.html#aebf05411c8a2938f71b20faa002fbe2a">CUdpClient::Init</a></div><div class="ttdeci">virtual CSockError Init(CSocket &amp;sock, bool isServer)</div><div class="ttdoc">将sock与服务类绑定，一个socket只能绑定一个udp服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00030">UdpClient.cpp:30</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_aa018e3d31a656f08527d151120c27794"><div class="ttname"><a href="class_c_udp_client.html#aa018e3d31a656f08527d151120c27794">CUdpClient::NotifyStop</a></div><div class="ttdeci">virtual void NotifyStop()</div><div class="ttdoc">通知服务停止</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00118">UdpClient.cpp:118</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_aafa046f3bc9f1442d2187bcdac47dcf0"><div class="ttname"><a href="class_c_udp_io_client.html#aafa046f3bc9f1442d2187bcdac47dcf0">CUdpIoClient::delete_class_copy_operator</a></div><div class="ttdeci">delete_class_copy_operator(CUdpIoClient)</div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_accf83768e36041acd016f70e55fabbc7"><div class="ttname"><a href="class_c_udp_io_client.html#accf83768e36041acd016f70e55fabbc7">CUdpIoClient::AsyncConnect</a></div><div class="ttdeci">void AsyncConnect(CUdpIoSocket &amp;sock, Func func, void *invoker)</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00052">UdpIoClient.h:52</a></div></div>
<div class="ttc" id="atools_8h_html_ab689500aaec0db066e3ac9483d3fe425"><div class="ttname"><a href="tools_8h.html#ab689500aaec0db066e3ac9483d3fe425">NullPtr</a></div><div class="ttdeci">#define NullPtr</div><div class="ttdef"><b>Definition:</b> <a href="tools_8h_source.html#l00119">tools.h:119</a></div></div>
<div class="ttc" id="aclass_post_handle_null_html"><div class="ttname"><a href="class_post_handle_null.html">PostHandleNull</a></div><div class="ttdef"><b>Definition:</b> <a href="_sock_tools_8h_source.html#l00255">SockTools.h:255</a></div></div>
<div class="ttc" id="aclass_c_basic_service_html"><div class="ttname"><a href="class_c_basic_service.html">CBasicService</a></div><div class="ttdoc">服务类 基类</div><div class="ttdef"><b>Definition:</b> <a href="_service_base_8h_source.html#l00015">ServiceBase.h:15</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html"><div class="ttname"><a href="class_c_udp_io_client.html">CUdpIoClient</a></div><div class="ttdoc">udp连接发送类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00012">UdpIoClient.h:12</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html_a8cb56c4554afb0fd36e69c60a1e04933"><div class="ttname"><a href="class_c_udp_client.html#a8cb56c4554afb0fd36e69c60a1e04933">CUdpClient::Post</a></div><div class="ttdeci">virtual void Post(const SharedPtr&lt; HandleBase &gt; &amp;func, void *invoker=NullPtr)</div><div class="ttdoc">投递一个中断请求</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8cpp_source.html#l00090">UdpClient.cpp:90</a></div></div>
<div class="ttc" id="aclass_c_udp_io_client_html_ad895a6e4cacb163bdc64916e96cedb85"><div class="ttname"><a href="class_c_udp_io_client.html#ad895a6e4cacb163bdc64916e96cedb85">CUdpIoClient::GetUdpServicePtr</a></div><div class="ttdeci">CBasicService * GetUdpServicePtr()</div><div class="ttdoc">获取底层服务类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_io_client_8h_source.html#l00136">UdpIoClient.h:136</a></div></div>
<div class="ttc" id="aclass_c_udp_client_html"><div class="ttname"><a href="class_c_udp_client.html">CUdpClient</a></div><div class="ttdoc">udp服务类，用于连接发送功能 固删除接收对端地址的读写函数，若要接收对端地址信息的读写需使用UdpServer类</div><div class="ttdef"><b>Definition:</b> <a href="_udp_client_8h_source.html#l00014">UdpClient.h:14</a></div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
